After creating a redactor object, configure the style information used to redact search matches and to receive notifications as the matches are redacted. Configurable settings include:
-
Fill color. The fill color is used to draw a solid rectangle within the match bounding boxes. Use the function IG_REC_redactor_fillcolor_set to choose an appropriate fill color.
To give the appearance that text has been erased instead of redacted, choose a fill color that matches the page background color, e.g., white on white.
-
Text color. The text color is used to draw replacement text inside match bounding boxes. Specify the color used to draw replacement text into each match result. Use the function IG_REC_redactor_textcolor_set to choose an appropriate text color.
Choose a color that contrasts well with the fill color, e.g., black on white.
-
Replacement text. Each letter of a match is replaced with this character. No portion of the replacement text is drawn outside match bounding boxes. Use the function IG_REC_redactor_replacement_text_set to choose a suitable replacement character.
To visually identify how many characters are redacted, choose a distinguishable replacement character, e.g., asterisk ("*", U+002A).
-
Font attributes. The font attributes establish the visual appearance of replacement text. Use the function IG_REC_redactor_font_set to specify suitable font attributes to use when redacting matches.
If the font size is too large for a match’s bounding box, replacement text will be clipped.
-
Notifications. Install callbacks to receive notification when all page matches are redacted and progress is noted during the redact operation:
-
Redacted callback. The redacted callback is called after all matches for a page have been successfully redacted. This notification can be expected to occur once per page. Invoke the function IG_REC_redactor_redacted_cb_set to install a user-defined redacted callback.
Applications that need access to redacted callback data after the callback returns must duplicate relevant data and assume ownership of the copy.
-
Progress callback. The progress callback is invoked periodically during the redact operation to report the estimated percentage of the redact operation completed. This callback also presents an opportunity for the caller to stop the redactor prior to completion. Use the function IG_REC_redactor_progress_cb_set to install a user-defined progress callback.
Any changes made to the HMIGEAR sources before redact is stopped are retained.
-
Redacted callback. The redacted callback is called after all matches for a page have been successfully redacted. This notification can be expected to occur once per page. Invoke the function IG_REC_redactor_redacted_cb_set to install a user-defined redacted callback.